package com.pmgames.vo;

public class User implements IXmlSerializable {

	private String username;
	private String password;
	private String name;
	private String type;
	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public User() {
		
	}
	
	/* (non-Javadoc)
	* @see java.lang.Object#equals(java.lang.Object)
	*/
	@Override
	public boolean equals(Object arg0) {
		return this.username == ((User)arg0).getUsername();
	}

	@Override
	public String toXml() {
		String xml = "<user>";
		xml += "<username>" + username + "</username>";
		xml += "<name>" + name + "</name>";
		xml += "<type>" + type + "</type>";
		xml += "</user>";
		return xml;
	}

}
